<?php

namespace App\Http\Controllers\User;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;

class RecruitController extends Controller
{
    public function getRecruitImg(){
        try{
            $chose =DB::table('aboutcompany')->where('type','=','1')->select('aboutcompany_image')->get();
            return json_encode(['msg'=>1,'data' => $chose]);

        }catch (Exception $e){

            $info =  $e->getMessage().'failed line:'.$e->getLine().'failed string:'.$e->getTraceAsString();
            return json_encode(['msg'=>0,'data' => $info]);
            exit;
        }
    }

    public function getRecruitInfo(){
        try{
            $chose =DB::table('recruit_info')->get();
            return json_encode(['msg'=>1,'data' => $chose]);

        }catch (Exception $e){

            $info =  $e->getMessage().'failed line:'.$e->getLine().'failed string:'.$e->getTraceAsString();
            return json_encode(['msg'=>0,'data' => $info]);
            exit;
        }

    }
}
